<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <cpn></cpn>
  <cpn><h2>这是slot</h2></cpn>
  <cpn>
    <h2>这是h2-slot</h2>
    <p>这是p-slot</p>
  </cpn>
</div>
<template id="cpn">
  <div>
    <h2>模板标题</h2>
    <p>模板内容</p>
    <slot></slot>
  </div>
</template>
<script src="../js/vue.js"></script>
<script>
  const aaa = new Vue({
    el: "#app",
    data: {
      message: "hello,guys",
    },
    components: {
      'cpn': {
        template: "#cpn",
      }
    }
  })
</script>
</body>
</html>